﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Transactions {
    import Classes.*;

    public class TOpenBusiness extends TWorldState {

        protected var m_desiredComm:String;
        protected var m_usedComm:String;

        public function TOpenBusiness(_arg1:Business, _arg2:String){
            this.m_desiredComm = _arg2;
            this.m_usedComm = "";
            super(_arg1);
        }
        override public function perform():void{
            signedWorldAction("openBusiness", this.m_desiredComm);
        }
        override protected function onWorldActionComplete(_arg1:Object):void{
            if (!_arg1){
                return;
            };
            if (_arg1["usedCommodity"]){
                this.m_usedComm = _arg1.usedCommodity;
            };
        }
        public function get desiredCommodity():String{
            return (this.m_desiredComm);
        }
        public function get usedCommodity():String{
            return (this.m_usedComm);
        }

    }
}//package Transactions 
